package com.lds.memory.kafka.util;

import org.apache.commons.lang3.StringUtils;

/**
 * Read value from system env.
 */
public class EnvUtils {
    public static int getInt(String envName) {
        String envValue = System.getenv(envName);
        if (StringUtils.isEmpty(envValue)) return -1;
        try {
            return Integer.parseInt(envValue);
        } catch (Exception e) {}
        return -1;
    }

}
